#default user interface.
#120203 rodin.s: internationalized.
#120224 handle translated help.htm
#120504 some files moved into /tmp/petget
#120515 calls to /tmp/petget/filterpkgs.results.postfilter.sh replace by /usr/local/petget/postfilterpkgs.sh.
#120527 first column of tree now an icon.
#120529 app icons in tree. variable FLG_APPICONS created in pkg_chooser.sh
#120811 category field now supports sub-category |category;subcategory|, use as icon in ppm main window.
#121113 "Calculate" is old name, top-level menu category is now "Business".
#130330 GUI filter. see also filterpkgs.sh, pkg_chooser.sh, ui_Ziggy.
#130331 more GUI filter options.

export TEXTDOMAIN=petget___ui_Classic
export OUTPUT_CHARSET=UTF-8

APPICONXMLINSERT=' icon-column="1"' #120811 each line is format: abiword0-1.2.3|subcategory|description of abiword|stuff

touch /var/local/petget/bb_category
if [ "`cat /var/local/petget/bb_category`" = "true" ]; then
  BBCATEGORY="<radiobutton><label>$(gettext 'BuildingBlock')</label><action>/usr/local/petget/filterpkgs.sh BuildingBlock</action><action>refresh:TREE1</action></radiobutton>"
else
  BBCATEGORY=""
fi

#120224 handle translated help.htm
LANG1="${LANG%_*}" #ex: de
HELPFILE="/usr/local/petget/help.htm"
[ -f /usr/local/petget/help-${LANG1}.htm ] && HELPFILE="/usr/local/petget/help-${LANG1}.htm"

DEFGUIFILTER="$(cat /var/local/petget/gui_filter)" #130330 see pkg_chooser.sh, and below.

#130330 $GUIONLYSTR $ANYTYPESTR are exported from pkg_chooser.sh. 130331 also $GUIEXCSTR $NONGUISTR
export MAIN_DIALOG="<window title=\"$(gettext 'Puppy Package Manager')\" icon-name=\"gtk-about\">

<vbox>
  <vbox space-fill=\"false\" space-expand=\"false\">
    <frame $(gettext 'Repo:')>
      <hbox scrollable=\"true\">
        ${DB_ORDERED}
        <text space-fill=\"true\" space-expand=\"true\"><label>\"\"</label></text>
        <height>64</height>
      </hbox>
    </frame>
  </vbox>

 ${xFIRSTCHARS}
 <hbox>
  <vbox spacing=\"1\" visible=\"false\">
   <radiobutton><label>$(gettext 'Desktop')</label><action>/usr/local/petget/filterpkgs.sh Desktop</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'System')</label><action>/usr/local/petget/filterpkgs.sh System</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'Setup')</label><action>/usr/local/petget/filterpkgs.sh Setup</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'Utility')</label><action>/usr/local/petget/filterpkgs.sh Utility</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'Filesystem')</label><action>/usr/local/petget/filterpkgs.sh Filesystem</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'Graphic')</label><action>/usr/local/petget/filterpkgs.sh Graphic</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'Document')</label><action>/usr/local/petget/filterpkgs.sh Document</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'Business')</label><action>/usr/local/petget/filterpkgs.sh Business</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'Personal')</label><action>/usr/local/petget/filterpkgs.sh Personal</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'Network')</label><action>/usr/local/petget/filterpkgs.sh Network</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'Internet')</label><action>/usr/local/petget/filterpkgs.sh Internet</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'Multimedia')</label><action>/usr/local/petget/filterpkgs.sh Multimedia</action><action>refresh:TREE1</action></radiobutton>
   <radiobutton><label>$(gettext 'Fun')</label><action>/usr/local/petget/filterpkgs.sh Fun</action><action>refresh:TREE1</action></radiobutton>
   ${BBCATEGORY}
   ${ALLCATEGORY}
   <variable>CATEGORY_FIELD</variable>
  </vbox>
  <vbox>
  <tree column-resizeable=\"false|false\">
    <label>$(gettext 'Package|Description')</label>
    <height>280</height><width>668</width>
    <variable>TREE1</variable>
    <input${APPICONXMLINSERT}>cat /tmp/petget/filterpkgs.results.post</input>
    <action>/usr/local/petget/installpreview.sh</action>
    <action>/usr/local/petget/finduserinstalledpkgs.sh</action>
    <action>refresh:TREE2</action>
    <action signal=\"button-release-event\">/usr/local/petget/installpreview.sh</action>
    <action signal=\"button-release-event\">/usr/local/petget/finduserinstalledpkgs.sh</action>
    <action signal=\"button-release-event\">refresh:TREE2</action>
  </tree>
  </vbox>
 </hbox>
<hbox>
 <vbox>
  
  <hbox>
   <text><label>$(gettext 'Show:')</label></text>
   <checkbox><default>${DEF_CHK_EXE}</default><label>EXE</label><variable>CHK_EXE</variable><action>/usr/local/petget/postfilterpkgs.sh EXE \$CHK_EXE</action><action>refresh:TREE1</action></checkbox>
   <checkbox><default>${DEF_CHK_DEV}</default><label>DEV</label><variable>CHK_DEV</variable><action>/usr/local/petget/postfilterpkgs.sh DEV \$CHK_DEV</action><action>refresh:TREE1</action></checkbox>
   <checkbox><default>${DEF_CHK_DOC}</default><label>DOC</label><variable>CHK_DOC</variable><action>/usr/local/petget/postfilterpkgs.sh DOC \$CHK_DOC</action><action>refresh:TREE1</action></checkbox>
   <checkbox><default>${DEF_CHK_NLS}</default><label>NLS</label><variable>CHK_NLS</variable><action>/usr/local/petget/postfilterpkgs.sh NLS \$CHK_NLS</action><action>refresh:TREE1</action></checkbox>
  </hbox>
  
  <hbox>
   <comboboxtext width-request=\"140\">
    <variable>FILTERCOMBOBOX</variable>
    <default>$DEFGUIFILTER</default>
    <item>$ANYTYPESTR</item>
    <item>$GUIONLYSTR</item>
    <item>GTK+2 $GUIONLYSTR</item>
    <item>GTK+3 $GUIONLYSTR</item>
    <item>Qt4 $GUIONLYSTR</item>
    <item>Qt4 $GUIEXCSTR KDE</item>
    <item>Qt5 $GUIONLYSTR</item>
    <item>Qt5 $GUIEXCSTR KDE</item>
    <item>$NONGUISTR</item>
    <action>echo -n \"\$FILTERCOMBOBOX\" > /var/local/petget/gui_filter</action>
    <action>/usr/local/petget/filterpkgs.sh</action>
    <action>refresh:TREE1</action>
   </comboboxtext>
   <text><label>\" \"</label></text>
   
   <text><label>$(gettext 'Help:')</label></text>
   <button><input file>/usr/local/lib/X11/mini-icons/mini-question.xpm</input><action>defaulthtmlviewer file://${HELPFILE} & </action></button>
  </hbox>
  
  <hbox>
   <text><label>$(gettext 'Find:')</label></text>
   <entry activates-default=\"true\">
    <variable>ENTRY1</variable>
   </entry>
   <button can-default=\"true\" has-default=\"true\" use-stock=\"true\">
    <label>$(gettext 'Go')</label>
    <action>/usr/local/petget/findnames.sh</action>
    <action>refresh:TREE1</action>
    <action>/usr/local/petget/show_installed_version_diffs.sh & </action>
   </button>
  </hbox>
  <button>
   <input file icon=\"gtk-preferences\"></input>
   <label>$(gettext 'Configure package manager')</label>
   <action>/usr/local/petget/configure.sh</action>
   <action>/usr/local/petget/filterpkgs.sh</action>
   <action>refresh:TREE1</action>
  </button>
  <button type=\"exit\">
   <input file icon=\"mini-exit\"></input>
   <label>$(gettext 'Exit package manager')</label>
  </button>
 </vbox>
 <text><label>\" \"</label></text>
 <frame $(gettext 'Installed packages')>
  <tree column-resizeable=\"false|false\">
    <label>$(gettext 'Package|Description')</label>
    <height>100</height><width>480</width>
    <variable>TREE2</variable>
    <input${APPICONXMLINSERT}>cat /tmp/petget/installedpkgs.results.post</input>
    <action>/usr/local/petget/removepreview.sh</action>
    <action>/usr/local/petget/finduserinstalledpkgs.sh</action>
    <action>refresh:TREE2</action>
    <action signal=\"button-release-event\">/usr/local/petget/removepreview.sh</action>
    <action signal=\"button-release-event\">/usr/local/petget/finduserinstalledpkgs.sh</action>
    <action signal=\"button-release-event\">refresh:TREE2</action>
  </tree>
 </frame>
</hbox>
</vbox>
<action signal=\"configure-event\">show:CATEGORY_FIELD</action>
</window>
"

export TEXTDOMAIN=petget___pkg_chooser.sh
